#ifndef _AbstructFactory_H_
#define _AbstructFactory_H_
#include"monster.h"
#include<vector>

class AbstructFactory{
public:
    virtual ~AbstructFactory() {
        while(!vt.empty()) {
            delete vt.back();
            vt.pop_back();
        }
    }
    virtual void createMonster() {}

    static std::vector<Monster*>vt;
protected:
    AbstructFactory(/* args */) {}
private:
    /* data */
    virtual Monster* createShooter() = 0;
    virtual Monster* createMaster() = 0;
    virtual Monster* createMeatshield() = 0;
};

class concreteFactory1 : public  AbstructFactory {
public:
    concreteFactory1() {}
    ~concreteFactory1() {}
    void createMonster();
protected:
private:
    Monster* createShooter();
    Monster* createMaster();
    Monster* createMeatshield();
};

class concreteFactory2 : public  AbstructFactory {
public:
    concreteFactory2() {}
    ~concreteFactory2() {}
    void createMonster();
protected:
private:
    Monster* createShooter();
    Monster* createMaster();
    Monster* createMeatshield();
};

#endif